Integrand size = 37, antiderivative size = 253 \[ \int \sec ^{-1-n}(c+d x) (a+a \sec (c+d x))^n \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {A \sec ^{-n}(c+d x) (a+a \sec (c+d x))^n \sin (c+d x)}{d (1+n)}-\frac {(C-A n+C n) \operatorname {Hypergeometric2F1}\left (\frac {1}{2}-n,-n,1-n,-\frac {2 \sec (c+d x)}{1-\sec (c+d x)}\right ) \sec ^{1-n}(c+d x) \left (\frac {1+\sec (c+d x)}{1-\sec (c+d x)}\right )^{\frac {1}{2}-n} (a+a \sec (c+d x))^n \sin (c+d x)}{d n (1+n) (1+\sec (c+d x))}+\frac {2^{\frac {3}{2}+n} C \operatorname {AppellF1}\left (\frac {1}{2},1+n,-\frac {1}{2}-n,\frac {3}{2},1-\sec (c+d x),\frac {1}{2} (1-\sec (c+d x))\right ) (1+\sec (c+d x))^{-\frac {1}{2}-n} (a+a \sec (c+d x))^n \tan (c+d x)}{d} \]
A*(a+a*sec(d*x+c))^n*sin(d*x+c)/d/(1+n)/(sec(d*x+c)^n)-(-A*n+C*n+C)*hyperg eom([-n, 1/2-n],[1-n],-2*sec(d*x+c)/(1-sec(d*x+c)))*sec(d*x+c)^(1-n)*((1+s ec(d*x+c))/(1-sec(d*x+c)))^(1/2-n)*(a+a*sec(d*x+c))^n*sin(d*x+c)/d/n/(1+n) /(1+sec(d*x+c))+2^(3/2+n)*C*AppellF1(1/2,1+n,-1/2-n,3/2,1-sec(d*x+c),1/2-1 /2*sec(d*x+c))*(1+sec(d*x+c))^(-1/2-n)*(a+a*sec(d*x+c))^n*tan(d*x+c)/d
\[ \int \sec ^{-1-n}(c+d x) (a+a \sec (c+d x))^n \left (A+C \sec ^2(c+d x)\right ) \, dx=\int \sec ^{-1-n}(c+d x) (a+a \sec (c+d x))^n \left (A+C \sec ^2(c+d x)\right ) \, dx \]
Time = 1.01 (sec) , antiderivative size = 263, normalized size of antiderivative = 1.04, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.270, Rules used = {3042, 4575, 3042, 4511, 3042, 4315, 3042, 4312, 142, 150}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sec ^{-n-1}(c+d x) (a \sec (c+d x)+a)^n \left (A+C \sec ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \csc \left (c+d x+\frac {\pi }{2}\right )^{-n-1} \left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^n \left (A+C \csc \left (c+d x+\frac {\pi }{2}\right )^2\right )dx\) |
\(\Big \downarrow \) 4575 |
\(\displaystyle \frac {\int \sec ^{-n}(c+d x) (\sec (c+d x) a+a)^n (a A n+a C (n+1) \sec (c+d x))dx}{a (n+1)}+\frac {A \sin (c+d x) \sec ^{-n}(c+d x) (a \sec (c+d x)+a)^n}{d (n+1)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \csc \left (c+d x+\frac {\pi }{2}\right )^{-n} \left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^n \left (a A n+a C (n+1) \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx}{a (n+1)}+\frac {A \sin (c+d x) \sec ^{-n}(c+d x) (a \sec (c+d x)+a)^n}{d (n+1)}\) |
\(\Big \downarrow \) 4511 |
\(\displaystyle \frac {a (A n-C (n+1)) \int \sec ^{-n}(c+d x) (\sec (c+d x) a+a)^ndx+C (n+1) \int \sec ^{-n}(c+d x) (\sec (c+d x) a+a)^{n+1}dx}{a (n+1)}+\frac {A \sin (c+d x) \sec ^{-n}(c+d x) (a \sec (c+d x)+a)^n}{d (n+1)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {a (A n-C (n+1)) \int \csc \left (c+d x+\frac {\pi }{2}\right )^{-n} \left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^ndx+C (n+1) \int \csc \left (c+d x+\frac {\pi }{2}\right )^{-n} \left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^{n+1}dx}{a (n+1)}+\frac {A \sin (c+d x) \sec ^{-n}(c+d x) (a \sec (c+d x)+a)^n}{d (n+1)}\) |
\(\Big \downarrow \) 4315 |
\(\displaystyle \frac {a (A n-C (n+1)) (\sec (c+d x)+1)^{-n} (a \sec (c+d x)+a)^n \int \sec ^{-n}(c+d x) (\sec (c+d x)+1)^ndx+a C (n+1) (\sec (c+d x)+1)^{-n} (a \sec (c+d x)+a)^n \int \sec ^{-n}(c+d x) (\sec (c+d x)+1)^{n+1}dx}{a (n+1)}+\frac {A \sin (c+d x) \sec ^{-n}(c+d x) (a \sec (c+d x)+a)^n}{d (n+1)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {a (A n-C (n+1)) (\sec (c+d x)+1)^{-n} (a \sec (c+d x)+a)^n \int \csc \left (c+d x+\frac {\pi }{2}\right )^{-n} \left (\csc \left (c+d x+\frac {\pi }{2}\right )+1\right )^ndx+a C (n+1) (\sec (c+d x)+1)^{-n} (a \sec (c+d x)+a)^n \int \csc \left (c+d x+\frac {\pi }{2}\right )^{-n} \left (\csc \left (c+d x+\frac {\pi }{2}\right )+1\right )^{n+1}dx}{a (n+1)}+\frac {A \sin (c+d x) \sec ^{-n}(c+d x) (a \sec (c+d x)+a)^n}{d (n+1)}\) |
\(\Big \downarrow \) 4312 |
\(\displaystyle \frac {\frac {a (A n-C (n+1)) \tan (c+d x) (\sec (c+d x)+1)^{-n-\frac {1}{2}} (a \sec (c+d x)+a)^n \int \frac {\sec ^{-n-1}(c+d x) (\sec (c+d x)+1)^{n-\frac {1}{2}}}{\sqrt {1-\sec (c+d x)}}d(1-\sec (c+d x))}{d \sqrt {1-\sec (c+d x)}}+\frac {a C (n+1) \tan (c+d x) (\sec (c+d x)+1)^{-n-\frac {1}{2}} (a \sec (c+d x)+a)^n \int \frac {\sec ^{-n-1}(c+d x) (\sec (c+d x)+1)^{n+\frac {1}{2}}}{\sqrt {1-\sec (c+d x)}}d(1-\sec (c+d x))}{d \sqrt {1-\sec (c+d x)}}}{a (n+1)}+\frac {A \sin (c+d x) \sec ^{-n}(c+d x) (a \sec (c+d x)+a)^n}{d (n+1)}\) |
\(\Big \downarrow \) 142 |
\(\displaystyle \frac {\frac {a C (n+1) \tan (c+d x) (\sec (c+d x)+1)^{-n-\frac {1}{2}} (a \sec (c+d x)+a)^n \int \frac {\sec ^{-n-1}(c+d x) (\sec (c+d x)+1)^{n+\frac {1}{2}}}{\sqrt {1-\sec (c+d x)}}d(1-\sec (c+d x))}{d \sqrt {1-\sec (c+d x)}}+\frac {a (A n-C (n+1)) \sin (c+d x) \sec ^{1-n}(c+d x) \left (\frac {\sec (c+d x)+1}{1-\sec (c+d x)}\right )^{\frac {1}{2}-n} (a \sec (c+d x)+a)^n \operatorname {Hypergeometric2F1}\left (\frac {1}{2}-n,-n,1-n,-\frac {2 \sec (c+d x)}{1-\sec (c+d x)}\right )}{d n (\sec (c+d x)+1)}}{a (n+1)}+\frac {A \sin (c+d x) \sec ^{-n}(c+d x) (a \sec (c+d x)+a)^n}{d (n+1)}\) |
\(\Big \downarrow \) 150 |
\(\displaystyle \frac {\frac {a (A n-C (n+1)) \sin (c+d x) \sec ^{1-n}(c+d x) \left (\frac {\sec (c+d x)+1}{1-\sec (c+d x)}\right )^{\frac {1}{2}-n} (a \sec (c+d x)+a)^n \operatorname {Hypergeometric2F1}\left (\frac {1}{2}-n,-n,1-n,-\frac {2 \sec (c+d x)}{1-\sec (c+d x)}\right )}{d n (\sec (c+d x)+1)}+\frac {a C 2^{n+\frac {3}{2}} (n+1) \tan (c+d x) (\sec (c+d x)+1)^{-n-\frac {1}{2}} (a \sec (c+d x)+a)^n \operatorname {AppellF1}\left (\frac {1}{2},n+1,-n-\frac {1}{2},\frac {3}{2},1-\sec (c+d x),\frac {1}{2} (1-\sec (c+d x))\right )}{d}}{a (n+1)}+\frac {A \sin (c+d x) \sec ^{-n}(c+d x) (a \sec (c+d x)+a)^n}{d (n+1)}\) |
(A*(a + a*Sec[c + d*x])^n*Sin[c + d*x])/(d*(1 + n)*Sec[c + d*x]^n) + ((a*( A*n - C*(1 + n))*Hypergeometric2F1[1/2 - n, -n, 1 - n, (-2*Sec[c + d*x])/( 1 - Sec[c + d*x])]*Sec[c + d*x]^(1 - n)*((1 + Sec[c + d*x])/(1 - Sec[c + d *x]))^(1/2 - n)*(a + a*Sec[c + d*x])^n*Sin[c + d*x])/(d*n*(1 + Sec[c + d*x ])) + (2^(3/2 + n)*a*C*(1 + n)*AppellF1[1/2, 1 + n, -1/2 - n, 3/2, 1 - Sec [c + d*x], (1 - Sec[c + d*x])/2]*(1 + Sec[c + d*x])^(-1/2 - n)*(a + a*Sec[ c + d*x])^n*Tan[c + d*x])/d)/(a*(1 + n))
3.4.4.3.1 Defintions of rubi rules used
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) )^(p_), x_] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^n*((e + f*x)^(p + 1)/((b*e - a*f)*(m + 1)))*Hypergeometric2F1[m + 1, -n, m + 2, (-(d*e - c*f))*((a + b*x)/((b*c - a*d)*(e + f*x)))])/((b*e - a*f)*((c + d*x)/((b*c - a*d)*(e + f *x))))^n, x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && EqQ[m + n + p + 2, 0] && !IntegerQ[n]
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((e_) + (f_.)*(x_))^(p_), x_ ] :> Simp[c^n*e^p*((b*x)^(m + 1)/(b*(m + 1)))*AppellF1[m + 1, -n, -p, m + 2 , (-d)*(x/c), (-f)*(x/e)], x] /; FreeQ[{b, c, d, e, f, m, n, p}, x] && !In tegerQ[m] && !IntegerQ[n] && GtQ[c, 0] && (IntegerQ[p] || GtQ[e, 0])
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))^(m_), x_Symbol] :> Simp[(-(a*(d/b))^n)*(Cot[e + f*x]/(a^(n - 2)*f*Sqrt [a + b*Csc[e + f*x]]*Sqrt[a - b*Csc[e + f*x]])) Subst[Int[(a - x)^(n - 1) *((2*a - x)^(m - 1/2)/Sqrt[x]), x], x, a - b*Csc[e + f*x]], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 - b^2, 0] && !IntegerQ[m] && GtQ[a, 0] & & !IntegerQ[n] && GtQ[a*(d/b), 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[a^IntPart[m]*((a + b*Csc[e + f*x])^FracPart[m ]/(1 + (b/a)*Csc[e + f*x])^FracPart[m]) Int[(1 + (b/a)*Csc[e + f*x])^m*(d *Csc[e + f*x])^n, x], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 - b^ 2, 0] && !IntegerQ[m] && !GtQ[a, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(A*b - a*B)/b Int[(a + b*Csc[e + f*x])^m*(d*Csc[e + f*x])^n, x], x] + Simp[B/b Int[(a + b*Csc[e + f*x])^(m + 1)*(d*Csc[e + f*x])^n, x], x] /; FreeQ[{a, b , d, e, f, A, B, m}, x] && NeQ[A*b - a*B, 0] && EqQ[a^2 - b^2, 0]
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(d_. ))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[A*Co t[e + f*x]*(a + b*Csc[e + f*x])^m*((d*Csc[e + f*x])^n/(f*n)), x] - Simp[1/( b*d*n) Int[(a + b*Csc[e + f*x])^m*(d*Csc[e + f*x])^(n + 1)*Simp[a*A*m - b *(A*(m + n + 1) + C*n)*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, A, C, m}, x] && EqQ[a^2 - b^2, 0] && !LtQ[m, -2^(-1)] && (LtQ[n, -2^(-1)] || EqQ[m + n + 1, 0])
\[\int \sec \left (d x +c \right )^{-1-n} \left (a +a \sec \left (d x +c \right )\right )^{n} \left (A +C \sec \left (d x +c \right )^{2}\right )d x\]
\[ \int \sec ^{-1-n}(c+d x) (a+a \sec (c+d x))^n \left (A+C \sec ^2(c+d x)\right ) \, dx=\int { {\left (C \sec \left (d x + c\right )^{2} + A\right )} {\left (a \sec \left (d x + c\right ) + a\right )}^{n} \sec \left (d x + c\right )^{-n - 1} \,d x } \]
\[ \int \sec ^{-1-n}(c+d x) (a+a \sec (c+d x))^n \left (A+C \sec ^2(c+d x)\right ) \, dx=\int \left (a \left (\sec {\left (c + d x \right )} + 1\right )\right )^{n} \left (A + C \sec ^{2}{\left (c + d x \right )}\right ) \sec ^{- n - 1}{\left (c + d x \right )}\, dx \]
\[ \int \sec ^{-1-n}(c+d x) (a+a \sec (c+d x))^n \left (A+C \sec ^2(c+d x)\right ) \, dx=\int { {\left (C \sec \left (d x + c\right )^{2} + A\right )} {\left (a \sec \left (d x + c\right ) + a\right )}^{n} \sec \left (d x + c\right )^{-n - 1} \,d x } \]
\[ \int \sec ^{-1-n}(c+d x) (a+a \sec (c+d x))^n \left (A+C \sec ^2(c+d x)\right ) \, dx=\int { {\left (C \sec \left (d x + c\right )^{2} + A\right )} {\left (a \sec \left (d x + c\right ) + a\right )}^{n} \sec \left (d x + c\right )^{-n - 1} \,d x } \]
Timed out. \[ \int \sec ^{-1-n}(c+d x) (a+a \sec (c+d x))^n \left (A+C \sec ^2(c+d x)\right ) \, dx=\int \frac {\left (A+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )\,{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^n}{{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{n+1}} \,d x \]